/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-12-10     xu       the first version
 */
#ifndef APPLICATIONS_TIME_UTILS_H_
#define APPLICATIONS_TIME_UTILS_H_

#include <time.h>

#define SECONDS_PER_DAY (24 * 3600)
#define MONTH_DAYS_MAX 31
#define DAYS_PER_WEEK 7

const char* tm_to_date_str(const struct tm* tm_struct);

time_t get_current_time();
int get_current_month_days();

extern time_t current_time;
extern struct tm current_tm;

#endif /* APPLICATIONS_TIME_UTILS_H_ */